﻿<#*********************************************************************

 This script will set the word app service to not run in sandbox.
 This fixes problem with Word apps not rendering
 
**********************************************************************#>

if ((Get-PSSnapin -Name  Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null) 
{ 
    Add-PsSnapin  Microsoft.SharePoint.PowerShell 
}

Get-SPServiceApplication | where {$_.TypeName.Equals("Word Viewing Service Application")} | % {$_.WordServerIsSandboxed = $false }
iisreset
